<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the MutableRectangle constructor from the Class MutableRectangle class from the dart:math library, for the Dart programming language.">
  <title>MutableRectangle constructor - MutableRectangle class - dart:math library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="../..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">
  
</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">shake</a></li>
    <li><a href="dart-math/dart-math-library.html">dart:math</a></li>
    <li><a href="dart-math/MutableRectangle-class.html">MutableRectangle<span class="signature">&lt;<wbr><span class="type-parameter">T extends num</span>&gt;</span></a></li>
    <li class="self-crumb">MutableRectangle constructor</li>
  </ol>
  <div class="self-name">MutableRectangle</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="index.html">shake</a></li>
      <li><a href="dart-math/dart-math-library.html">dart:math</a></li>
      <li><a href="dart-math/MutableRectangle-class.html">MutableRectangle<span class="signature">&lt;<wbr><span class="type-parameter">T extends num</span>&gt;</span></a></li>
      <li class="self-crumb">MutableRectangle constructor</li>
    </ol>
    
    <h5>MutableRectangle class</h5>
    <ol>
      <li class="section-title"><a href="dart-math/MutableRectangle-class.html#constructors">Constructors</a></li>
      <li><a href="dart-math/MutableRectangle/MutableRectangle.html">MutableRectangle</a></li>
      <li><a href="dart-math/MutableRectangle/MutableRectangle.fromPoints.html">fromPoints</a></li>
    
      <li class="section-title">
        <a href="dart-math/MutableRectangle-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="dart-math/MutableRectangle/height.html">height</a></li>
      <li><a href="dart-math/MutableRectangle/left.html">left</a></li>
      <li><a href="dart-math/MutableRectangle/top.html">top</a></li>
      <li><a href="dart-math/MutableRectangle/width.html">width</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/bottom.html">bottom</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/bottomLeft.html">bottomLeft</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/bottomRight.html">bottomRight</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/hashCode.html">hashCode</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/right.html">right</a></li>
      <li class="inherited"><a href="dart-core/Object/runtimeType.html">runtimeType</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/topLeft.html">topLeft</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/topRight.html">topRight</a></li>
    
      <li class="section-title inherited"><a href="dart-math/MutableRectangle-class.html#instance-methods">Methods</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/boundingBox.html">boundingBox</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/containsPoint.html">containsPoint</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/containsRectangle.html">containsRectangle</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/intersection.html">intersection</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/intersects.html">intersects</a></li>
      <li class="inherited"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/toString.html">toString</a></li>
    
      <li class="section-title inherited"><a href="dart-math/MutableRectangle-class.html#operators">Operators</a></li>
      <li class="inherited"><a href="dart-math/Rectangle/operator_equals.html">operator ==</a></li>
    
    
    
    </ol>
  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1>MutableRectangle&lt;<wbr><span class="type-parameter">T extends num</span>&gt; constructor</h1></div>

    <section class="multi-line-signature">
      
      <span class="name ">MutableRectangle&lt;<wbr><span class="type-parameter">T extends num</span>&gt;</span>(<wbr><span class="parameter" id="-param-left"><span class="type-annotation">T</span> <span class="parameter-name">left</span>, </span> <span class="parameter" id="-param-top"><span class="type-annotation">T</span> <span class="parameter-name">top</span>, </span> <span class="parameter" id="-param-width"><span class="type-annotation">T</span> <span class="parameter-name">width</span>, </span> <span class="parameter" id="-param-height"><span class="type-annotation">T</span> <span class="parameter-name">height</span></span>)
    </section>

    <section class="desc markdown">
      <p>Create a mutable rectangle spanned by <code>(left, top)</code> and
<code>(left+width, top+height)</code>.</p>
<p>The rectangle contains the points
with x-coordinate between <code>left</code> and <code>left + width</code>, and
with y-coordinate between <code>top</code> and <code>top + height</code>, both inclusive.</p>
<p>The <code>width</code> and <code>height</code> should be non-negative.
If <code>width</code> or <code>height</code> are negative, they are clamped to zero.</p>
<p>If <code>width</code> and <code>height</code> are zero, the "rectangle" comprises only the single
point <code>(left, top)</code>.</p>
    </section>
    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">MutableRectangle(this.left, this.top, T width, T height)
    : this._width = (width &lt; 0) ? _clampToZero&lt;T&gt;(width) : width,
      this._height = (height &lt; 0) ? _clampToZero&lt;T&gt;(height) : height;</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    shake 0.1.0
  </span>

  
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>


</body>

</html>
